package testJdk.io.other_stream;


import java.io.*;

/**
 * @ClassName : com.io.other_stream.TestOther2
 * @Description : 类描述
 * Created by cyd on 2020-12-22 22:39:57
 */
public class TestOther2 {
    public static void main(String[] args) {
        try (BufferedReader br = new BufferedReader(new FileReader("D:/readme.txt"));
             PrintWriter pw = new PrintWriter("D:/readme2.txt")) {

            String str = br.readLine();
            while (str != null) {
                pw.println(str);
                str = br.readLine();
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
